import request from '@/utils/request'

/**
 *  关注
 * @query int noteId
 */

export const attentionService = (noteId) => {
    return request({
        url: `/noteFollows/${noteId}`,
        method: 'post',
    })
}

/**
 *  查看我的关注列表
 * @param int offset
 * @param int limit
 */

export const getMyAttentionListService = (offset, limit) => {
    return request({
        url: '/noteFollows',
        method: 'get',
        params: {
            offset,
            limit
        }
    })
}

/**
 *  完成
 *  @param int noteId
 */

export const finishAttentionService = (noteId, data) => {
    return request({
        url: `/noteFollows/${noteId}/complete`,
        method: 'post',
        data
    })
}

/**
 *  取消关注
 *  @param int noteId
 */

export const cancelAttentionService = (noteId) => {
    return request({
        url: `/noteFollows/${noteId}`,
        method: 'delete'
    })
}